#pragma once

#ifdef CDTV

    #include "memory.h"

extern addrbank dmac_bank;

extern void cdtv_init();
extern void cdtv_free();
extern void CDTV_hsync_handler();
extern void cdtv_check_banks();

void cdtv_battram_write(int addr, int v);
byte cdtv_battram_read(int addr);

extern void cdtv_loadcardmem(byte*, int);
extern void cdtv_savecardmem(byte*, int);

int cdtv_add_scsi_unit(int ch, const TCHAR* path, int blocksize,
    const TCHAR* devname, int sectors, int surfaces, int reserved,
    int bootpri);

extern void cdtv_getdmadata(uint*);

extern void rethink_cdtv();
extern void cdtv_scsi_int();
extern void cdtv_scsi_clear_int();

extern bool cdtv_front_panel(int);

#endif